<?php
// +------------------------------------------------+
// | http://www.cjango.com                          |
// +------------------------------------------------+
// | 修复BUG不是一朝一夕的事情，等我喝醉了再说吧！  |
// +------------------------------------------------+
// | Author: 小陈叔叔 <Jason.Chen[cjango.com]>      |
// +------------------------------------------------+

// 记录开始运行时间
$GLOBALS['_beginTime'] = microtime(TRUE);
// 记录内存初始使用
define('MEMORY_LIMIT_ON',function_exists('memory_get_usage'));
if(MEMORY_LIMIT_ON) $GLOBALS['_startUseMems'] = memory_get_usage();
// 版本号
const VERSION     =   '1.0.0';
// 类文件后缀
const EXT         =   '.class.php';
// 系统常量定义
defined('CORE_PATH')    or define('CORE_PATH',      __DIR__.'/');
defined('APP_PATH')     or define('APP_PATH',       dirname($_SERVER['SCRIPT_FILENAME']).'/');
defined('APP_DEBUG')    or define('APP_DEBUG',      false);

defined('RUNTIME_PATH') or define('RUNTIME_PATH',   APP_PATH.'Runtime/');
defined('LIB_PATH')     or define('LIB_PATH',       CORE_PATH.'Lib/');
defined('LOG_PATH')     or define('LOG_PATH',       RUNTIME_PATH.'Logs/');
defined('TEMP_PATH')    or define('TEMP_PATH',      RUNTIME_PATH.'Temp/');
defined('DATA_PATH')    or define('DATA_PATH',      RUNTIME_PATH.'Data/');
defined('CACHE_PATH')   or define('CACHE_PATH',     RUNTIME_PATH.'Cache/');

define('NOW_TIME',      $_SERVER['REQUEST_TIME']);
define('REQUEST_METHOD',$_SERVER['REQUEST_METHOD']);
define('IS_GET',        REQUEST_METHOD =='GET' ? true : false);
define('IS_POST',       REQUEST_METHOD =='POST' ? true : false);

// 加载核心
require LIB_PATH.'Jango'.EXT;
// 应用初始化 
Jango::start();